-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add vdiff subcommands #113
Conversation
src/server/cli/vdiff/migrate.js
Outdated
export async function migrate(argv = []) { | ||
const { pattern = './**' } = commandLineArgs({ name: 'pattern', type: String, defaultOption: true }, { partial: true, argv }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only changes to this from the bin
version were wrapping it in a function and changing the default pattern from ./test/**
to ./**
because there's no reason to restrict where to look for goldens by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this look in node_modules
? I remember that coming up in the old library
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will, but it's being ignored on line 12
63681da
to
436634c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@@ -15,8 +15,7 @@ | |||
}, | |||
"bin": { | |||
"d2l-test-runner": "./bin/d2l-test-runner.js", | |||
"d2l-test-vdiff-report": "./bin/d2l-test-vdiff-report.js", | |||
"migrate-goldens": "./bin/migrate-goldens.js" | |||
"dtr": "./bin/d2l-test-runner.js" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lol not sure I'll be able to use this without reading it as "define the relationship"
import { runner } from '../../src/server/cli/test-runner.js'; | ||
|
||
const { argv, stdout } = process; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Importing process
and destructuring allows us to modify argv
globally to test different inputs.
🎉 This PR is included in version 0.27.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
migrate-goldens
tod2l-test-runner vdiff migrate
d2l-test-vdiff-report
tod2l-test-runner vdiff report
--golden
option to a subcommandd2l-test-runner vdiff golden
--help
outputdtr
shortcut command